package com.atguigu.client;

import com.atguigu.entity.OrderInfo;
import com.atguigu.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@FeignClient(value = "shop-order")
public interface OrderFeignClient {
    //1.订单确认信息提供数据接口
    @GetMapping("/order/confirm")
    public RetVal<Map<String, Object>> confirm();

    @GetMapping("/order/getOrderInfo/{orderId}")
    public OrderInfo getOrderInfo(@PathVariable Long orderId);
    //保存订单基本信息与详情信息
    @RequestMapping("/order/saveOrderInfo")
    public Long saveOrderInfo(@RequestBody OrderInfo orderInfo);
}
